﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace Demo
{
    public partial class InputValidateCodeForm : Form
    {
        private InputValidateCodeForm()
        {
            InitializeComponent();
        }

        private void InputValidateCodeForm_Load(object sender, EventArgs e)
        {
            txtCode.SelectAll();
        }

        public static string Show(Image validataImage)
        {
            InputValidateCodeForm form = new InputValidateCodeForm();
            form.pbCode.Image = validataImage;
            if (form.ShowDialog() == DialogResult.OK)
                return form.txtCode.Text;
            return string.Empty;
        }
    }
}
